'use strict'
import servicePlatformList from '@/components/CustomPage/apps/widget/servicePlatform/index'
import {
  Area,
  Extend,
  Input,
  Link,
  Radio,
  Select,
  Slider,
  Switch,
  Color,
  UploadImage
} from '@/components/CustomPage/fields/widget'
import { DataOption } from '@/components/CustomPage/apps/map/dataops'

import { imgOption } from '@/components/CustomPage/apps/map/imgops'
import { BasicOption } from './basicops'

export default {
  /**
   * 服务平台列表
   * @constructor
   */
  servicePlatformList() {
    return {
      target: servicePlatformList,
      parameter: {
        relate: false,
        mold: 'field',
        label: '服务平台列表'
      },
      option: [
        {
          title: '基础配置',
          fields: [
            ...BasicOption(),
            {
              type: Slider,
              option: {
                label: '下边距',
                name: 'bottom',
                value: 0,
                max: 100,
                step: 1
              }
            },
            {
              type: Slider,
              option: {
                label: '左右边距',
                name: 'spacing',
                value: 0,
                max: 100,
                step: 1
              }
            },
            {
              type: UploadImage,
              option: { label: '背景图片', name: 'imgBg', required: false }
            },
            {
              type: Color,
              option: {
                label: '背景颜色',
                name: 'bgolor',
                value: '#230a72',
                showalpha: true
              }
            },
            // {
            //   type: Select,
            //   option: {
            //     label: '图片填充模式',
            //     name: 'imgType',
            //     list: [
            //       { name: '填充满', value: 'fill' },
            //       { name: '等比', value: 'contain' }
            //     ],
            //     value: 'fill'
            //   }
            // }
            ...imgOption(),
          ]
        },
        ...DataOption()
      ]
    }
  }
}
